package org.zoomdev.zoom.common.caster;

class CheckNullCaster implements ValueCaster {
    final ValueCaster valueCaster;

    CheckNullCaster(ValueCaster caster) {
        this.valueCaster = caster;
    }

    @Override
    public Object to(Object src) {
        if (src == null)
            return null;
        return valueCaster.to(src);
    }
}